package com.mingmen.supplier.activity;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.mingmen.supplier.R;
import com.mingmen.supplier.adapter.NoticeAdapter;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

public class NoticeListActivity extends Activity {

    @BindView(R.id.text_return)
    TextView textReturn;
    @BindView(R.id.linear_return)
    LinearLayout linearReturn;
    @BindView(R.id.text_Order)
    TextView textOrder;
    @BindView(R.id.layout_toolbar)
    RelativeLayout layoutToolbar;
    @BindView(R.id.textview_calendafirst)
    TextView textviewCalendafirst;
    @BindView(R.id.img_jingying)
    ImageView imgJingying;
    @BindView(R.id.layout_search)
    LinearLayout layoutSearch;


    @BindView(R.id.text_yijujue)
    TextView text_yijujue;


    @BindView(R.id.layout_all)
    LinearLayout layout_all;
    @BindView(R.id.text_weichuli)
    TextView text_weichuli;

    int flag = 0;
    @BindView(R.id.recycle_List)
    RecyclerView recycle_List;
    NoticeAdapter noticeAdapter;
    List<String> dataList = new ArrayList<>();

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_notice);
        ButterKnife.bind(this);
        recycle_List.setLayoutManager(new LinearLayoutManager(this));
        noticeAdapter = new NoticeAdapter(this, dataList);
        recycle_List.setAdapter(noticeAdapter);
        for (int i = 0; i < 10; i++) {
            dataList.add("Item" + i);
        }
        noticeAdapter.setDataList(dataList);
    }

    @OnClick({R.id.text_return, R.id.linear_return, R.id.text_Order, R.id.layout_toolbar, R.id.textview_calendafirst, R.id.img_jingying, R.id.layout_search, R.id.text_weichuli, R.id.text_yijujue, R.id.layout_all, R.id.recycle_List})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.text_return:

            case R.id.linear_return:
                finish();
                break;
            case R.id.text_Order:
                break;
            case R.id.layout_toolbar:
                break;
            case R.id.textview_calendafirst:
                break;
            case R.id.img_jingying:
                break;
            case R.id.layout_search:
                break;
            case R.id.text_weichuli:
                layout_all.setBackground(getResources().getDrawable(R.mipmap.weichuolileft));
                text_yijujue.setTextColor(getResources().getColor(R.color.normal_bluetextcolor));
                text_weichuli.setTextColor(getResources().getColor(R.color.white));
                flag = 1;
                break;
            case R.id.text_yijujue:
                layout_all.setBackground(getResources().getDrawable(R.mipmap.weichuoliright));
                text_weichuli.setTextColor(getResources().getColor(R.color.normal_bluetextcolor));
                text_yijujue.setTextColor(getResources().getColor(R.color.white));
                break;
            case R.id.layout_all:
                break;
            case R.id.recycle_List:
                break;
        }
    }
}
